<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="app">
        <p>{{ user }}</p>
        <input type="text" v-model="user.name">
    </div>
</body>
<script>
    new Vue({
        el:"#app",
        data:{
            user:{
                name:"tom"
            }
        },
        watch: {
            "user.name":{
                handler:function(newValue,oldValue){
                    // 结果内容是什么？为什么？
                    console.log(newValue);
                    console.log(oldValue);
                },
                deep:true
            }
        },
    })
</script>
</html>